/** \file gu_vertex_buffer.h

*/
#pragma once


#include "gr_streamsignature.h"
#include "gr_streamdata.h"
#include "gu_material.h"

#include <cstdint>
#include <functional>
#include <memory>

namespace gu
{

/** \class VertexBuffer*/
class VertexBuffer
{
public:

    virtual void updateParameters(LocMap& locMap) = 0;
    virtual bool init() = 0;
    virtual void detach() = 0;
    virtual bool use() = 0;
    virtual uint32_t id() = 0;
    virtual gr::StreamData& streamData() = 0;
};

/** \class IndexBuffer*/
class IndexBuffer
{
public:

    virtual size_t indexCount() = 0;
    virtual bool init() = 0;
    virtual void detach() = 0;
    virtual bool use() = 0;
    virtual uint32_t id() = 0;
    virtual gr::StreamGeometryIndexData& indexData() = 0;
};


VertexBuffer* newGlVertexBuffer();
IndexBuffer* newGlIndexBuffer();

}

